package com.itheima.myfile;

import java.io.File;
import java.io.IOException;

public class Demo5 {
    public static void main(String[] args) throws IOException {
//        File file1 = new File("D:\\FileTest\\java.txt");
//        System.out.println(file1.mkdirs());
//        //创建多级文件
//        File file2 = new File("D:\\JavaWEB\\HTML");
//        System.out.println(file2.mkdirs());
        //多级删除
        File file3 = new File("D:\\FileTest\\itheima");
        file3.mkdirs();
        File file4 = new File("D:\\FileTest\\itheima\\java.txt");
        file4.createNewFile();
        //删除
        boolean delete = file4.delete();
        boolean delete1 = file3.delete();

    }
}
